package ar.com.mindset.geometrics_wi.colorScheme.divisionStrategy;


/**
 * @author http://www.mindset-designs.com
 */
public class LinealDivision extends DivisionStrategy {

    private int divisionCount = -1;
    private String maxColor;
    private String minColor;

    public void setDivisionCount(int divisionCount) {
        this.divisionCount = divisionCount;
    }

    public void setMaxColor(String maxColor) {
        this.maxColor = maxColor;
    }

    public void setMinColor(String minColor) {
        this.minColor = minColor;
    }


    public void write(StringBuffer xml) {
        xml.append("<divisionStrategy><linealDivision");

        if (this.divisionCount != -1) {
            xml.append(" divisionCount='").append(this.divisionCount).append("'");
        }
        if (this.maxColor != null) {
            xml.append(" maxColor='").append(this.maxColor).append("'");
        }
        if (this.minColor != null) {
            xml.append(" minColor='").append(this.minColor).append("'");
        }
        xml.append("/>");

        xml.append("</divisionStrategy>");
    }
}
